package com.qfedu.sca.feign;

import com.qfedu.sca.common.param.UserAdd;
import com.qfedu.sca.common.param.UserLogin;
import com.qfedu.sca.common.vo.R;
import com.qfedu.sca.config.FeignRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * 千锋Java,为你而生！
 *
 * @Author: Feri
 * @Date:2024/11/8 10:14
 * @Modified:
 */
@FeignClient(name = "xingProvider",configuration = FeignRequestInterceptor.class)
public interface UserService {
    @PostMapping("server/user/add")
    R add(@RequestBody UserAdd user);

    @GetMapping("server/user/all")
    R all(@RequestParam("name") String name);
    @PostMapping("server/user/login")
    R login(@RequestBody UserLogin user);

    @GetMapping("server/user/logout")
    R logout();

}
